#!/bin/bash
dirname="/home/record/one-data-vol/enfs/dbench"
for thresh in 0 2048 4096 8192 16384
do
	echo $thresh > /proc/fs/enfs/wthreshold
	cat /proc/fs/enfs/wthreshold
	mkdir -p $dirname/$thresh

	for nproc in 1 2 4 8 
	do
	
	mkdir -p $dirname/$thresh/$nproc 

	rm -rf /bwfs/*
	umount /bwfs && rmmod blockvt && rmmod enfs && \
	mount -t enfs 10.10.170.24:/bwfs /bwfs

	/home/test/dbench-4.0/dbench -D/bwfs -t900 -c \
	/home/test/dbench-4.0/client.txt $nproc >  $dirname/$thresh/$nproc/result
	cp /proc/self/mountstats  $dirname/$thresh/$nproc/
	done

done
